package com.training.bt.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.training.bt.common.PageResponseDTO;
import com.training.bt.entity.PointsRecord;
import com.training.bt.service.PointsRecordService;

import lombok.RequiredArgsConstructor;

@RestController
@RequestMapping("api/pointsRecord")
@RequiredArgsConstructor
public class PointsRecordController {
    private final PointsRecordService pointsRecordService;

    @GetMapping("/recordList")
    public PageResponseDTO<PointsRecord> recordList(
            @RequestParam int page,
            @RequestParam int size) {
        return pointsRecordService.getUserList(page, size);
    }
}
